#pragma once
#include "BaseElement.h"
#include "math.h"

class base_shape {
public:
	static byte** m_PicA;
	static byte** m_PicB;
	static FILE* m_fp;
	static long m_nRows;
	static long m_nCols;
	static long m_SRows;
	static int m_FileCount;
public:
	static void write_File(char* filePath, double& reso);
	static void close_File();
	virtual void Qua_Gray(vecLine& LDown, vecLine& LTop, int& maxGray);
	virtual void change_Gray(point& P, int& Gray);
	virtual void Tri_Gray(point& TriTop, vecLine& LDown, int& maxGray);
	static void fresh_File();
};

class pyramid :public base_shape {
private:
	point m_pCenter;
	double m_R;
public:
	pyramid(point& pC, double& R);
	void make_pyramid(int& side, int& maxG, double& angel);
};

class Etch :public base_shape {
private:
	point m_pCenter;
	double m_R;
	int m_maxG;
public:
	Etch(point& pC, double& R, int& maxG);
	void make_Etch(double& WlRatio, double& LrRatio, double& RidRatio, double& angel);
};

class TriWink :public base_shape {
private:
	point m_TriTop;
	vecLine m_LDown;
public:
	TriWink(point& TriTop, vecLine LDown);
	void Tri_Gray(int& maxG, double& cW, double& angel, double& curC);
	void Tri_Three(point& pCenter, int& maxG);
};

void singelCur(point& beginP, point& endP, double& cW, int& maxG, pic_Info& pic);

class recCur :public base_shape {
private:
	point m_pLB;
	double m_recLenth;
public:
	recCur(point& pLB, double& recLenth);
	void make_Cur(int& maxG, double& cW, double angel, double& curC);
	void Angel_Cur(int& maxG, double& cW, double angel, double& Rangel);
};